package com.ycz;

import com.ycz.service.UserService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @author ycz
 * @date 2021/6/18
 * @description TODO
 * @Company © 版权所有 深圳市天行云供应链有限公司
 */
@Configuration
@ComponentScan(value = {"com.ycz.service","com.ycz.config"})
@MapperScan("com.ycz.mapper")
public class Application {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
        applicationContext.register(Application.class);
        applicationContext.refresh();
        UserService userService = applicationContext.getBean("userService", UserService.class);
//        userService.getById();
        userService.insert();
    }

}
